package searcher;

/**
 * so as HeapElem but in float
 * i just don't want to modify the code used HeapElem
 * @author shitgao
 *
 */

public class HeapElemFloat implements Comparable<HeapElemFloat> {
	private float score;
	private int source;
	
	public HeapElemFloat (float score, int source){
		this.score=score;
		this.source=source;
	}
		
	public	int compareTo(HeapElemFloat that){
		if (this.score<that.score)
			return -1;
		if (this.score>that.score)
			return 1;
		return 0;
	}
	
	public float getScore(){
		return score;
	}
	
	public int getSource(){
		return source;
	}
}
